Skip to content

fix: neli ACK parsing, MCP error codes, disconnect log#99

Merged
maxholman merged 2 commits intomainfrom
fix/uat-20260320
Mar 20, 2026
Merged

fix: neli ACK parsing, MCP error codes, disconnect log#99
maxholman merged 2 commits intomainfrom
fix/uat-20260320

Conversation

@maxholman
Copy link
Copy Markdown
Contributor

Summary

  • neli 0.7 ACK parsingrecv_netlink_ack matched NlPayload::Payload which never matches for NLMSG_ERROR in neli 0.7. Now correctly matches NlPayload::Ack/Err. OS route add/remove was silently failing.
  • MCP error codes — daemon errors (peer not found, invalid CIDR) mapped as invalid_params (-32602) instead of internal_error (-32603)
  • Disconnect log — API-initiated peer disconnect now logs at info level, visible in ring buffer
  • Route display replaced with via (readable in all fonts/sizes)
  • Stale help text — removed dead subcommand references from CLI doc comments

How to verify

  • Range: wallhack route_add with a manual CIDR — verify no "Unexpected payload in ACK" in logs and ip route shows the kernel route
  • Range: wallhack disconnect <peer> — verify "Peer disconnected: ... (via API)" appears in wallhack logs
  • MCP: wallhack route_add with nonexistent peer — verify error code is -32602 not -32603

🤖 Generated with Claude Code

maxholman and others added 2 commits March 20, 2026 18:56
… log

Three bugs found during 2026-03-20 UAT session:

1. neli 0.7 ACK parsing: recv_netlink_ack matched NlPayload::Payload
   which never matches for NLMSG_ERROR — neli 0.7 parses these into
   NlPayload::Ack/Err variants. OS route add/remove silently failed.

2. MCP error codes: all daemon errors (peer not found, invalid CIDR)
   were wrapped as internal_error (-32603). Now uses invalid_params
   (-32602) since these are user-input validation failures.

3. API-initiated peer disconnect produced no log line. Added info-level
   log in do_disconnect so the event appears in the ring buffer.

Also: route display uses "via" instead of Unicode arrow, stale
subcommand references removed from help text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The log "Role resolved: name=X role=entry" was confusing because it
displayed the local node's resolved role next to the peer's name,
reading as if the peer's role was entry. Changed to
"Role resolved: peer=X local_role=entry" to prevent misreading.

Also: route display uses "via" instead of arrow, stale subcommand
reference removed from help text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@maxholman maxholman merged commit 8a93c3a into main Mar 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant